.class public Lrexsee/open/RexseeTencentWeibo;
.super Ljava/lang/Object;
.source "RexseeTencentWeibo.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;
.implements Lrexsee/open/OpenInterface;


# static fields
.field private static final DEFAULT_IP:Ljava/lang/String; = "112.90.140.155"

.field private static final DEFAULT_TIMEOUT:I = 0x4e20

.field public static final EVENT_TENCENTWEIBOREADY:Ljava/lang/String; = "onTencentWeiboReady"

.field public static final INTERFACE_NAME:Ljava/lang/String; = "TencentWeibo"

.field private static final STRING_ADD:Ljava/lang/String; = "\u6b63\u5728\u53d1\u9001\u5fae\u535a......"

.field private static final STRING_ADD_MESSAGE:Ljava/lang/String; = "\u563f\u563f\uff0c\u6211\u6b63\u5728\u6d4f\u89c8\u7528@rexsee_china\uff08http://www.rexsee.com\uff09\u521b\u5efa\u7684Android\u5e94\u7528{appName}\u3002"

.field private static final STRING_ADD_OK:Ljava/lang/String; = "\u5206\u4eab\u6210\u529f\u3002"

.field private static final STRING_NAME:Ljava/lang/String; = "\u817e\u8baf\u5fae\u535a"


# instance fields
.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mContext:Landroid/content/Context;

.field private mKey:Ljava/lang/String;

.field private final mOauth:Lrexsee/open/TencentOauth;

.field private mSecret:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 7
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    const/4 v5, 0x0

    const-string v6, "string"

    .line 70
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 72
    iput-object p1, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    .line 73
    iget-object v3, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {v3}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v3

    iput-object v3, p0, Lrexsee/open/RexseeTencentWeibo;->mContext:Landroid/content/Context;

    .line 74
    new-instance v3, Lrexsee/open/TencentOauth;

    invoke-direct {v3, p1}, Lrexsee/open/TencentOauth;-><init>(Lrexsee/core/browser/Browser;)V

    iput-object v3, p0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    .line 76
    iget-object v3, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v3, v3, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v4, "onTencentWeiboReady"

    invoke-virtual {v3, v4}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 78
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 79
    .local v2, "r":Landroid/content/res/Resources;
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    .line 80
    .local v1, "packageName":Ljava/lang/String;
    const-string v3, "TencentWeiboKey"

    const-string v4, "string"

    invoke-virtual {v2, v3, v6, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 81
    .local v0, "id":I
    if-nez v0, :cond_0

    move-object v3, v5

    :goto_0
    iput-object v3, p0, Lrexsee/open/RexseeTencentWeibo;->mKey:Ljava/lang/String;

    .line 82
    const-string v3, "TencentWeiboSecret"

    const-string v4, "string"

    invoke-virtual {v2, v3, v6, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 83
    if-nez v0, :cond_1

    move-object v3, v5

    :goto_1
    iput-object v3, p0, Lrexsee/open/RexseeTencentWeibo;->mSecret:Ljava/lang/String;

    .line 85
    return-void

    .line 81
    :cond_0
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto :goto_0

    .line 83
    :cond_1
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto :goto_1
.end method

.method private _get(Ljava/lang/String;Ljava/util/HashMap;)Ljava/lang/String;
    .locals 4
    .param p1, "url"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .line 105
    .local p2, "paramsMap":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    iget-object v0, p0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    const-string v1, "GET"

    invoke-virtual {v0, p1, v1, p2}, Lrexsee/open/TencentOauth;->sign(Ljava/lang/String;Ljava/lang/String;Ljava/util/HashMap;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 106
    iget-object v0, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lrexsee/open/RexseeTencentWeibo;->getInterfaceName()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ".post"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Sinature error!["

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "]"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 107
    const-string v0, ""

    .line 109
    :goto_0
    return-object v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private _post(Ljava/lang/String;Ljava/util/HashMap;)Ljava/lang/String;
    .locals 10
    .param p1, "url"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .line 112
    .local p2, "paramsMap":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    iget-object v6, p0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    const-string v7, "POST"

    invoke-virtual {v6, p1, v7, p2}, Lrexsee/open/TencentOauth;->sign(Ljava/lang/String;Ljava/lang/String;Ljava/util/HashMap;)Z

    move-result v6

    if-nez v6, :cond_0

    .line 113
    iget-object v6, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lrexsee/open/RexseeTencentWeibo;->getInterfaceName()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, ".post"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "Sinature error!["

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "]"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v7, v8}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 114
    const-string v6, ""

    .line 136
    :goto_0
    return-object v6

    .line 116
    :cond_0
    iget-object v6, p0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    invoke-virtual {v6, p2}, Lrexsee/open/TencentOauth;->getHttpEntity(Ljava/util/HashMap;)Lorg/apache/http/HttpEntity;

    move-result-object v2

    .line 117
    .local v2, "httpEntity":Lorg/apache/http/HttpEntity;
    if-nez v2, :cond_1

    .line 118
    iget-object v6, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lrexsee/open/RexseeTencentWeibo;->getInterfaceName()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, ".post"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "HttpEntity error!["

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "]"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v7, v8}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 119
    const-string v6, ""

    goto :goto_0

    .line 122
    :cond_1
    :try_start_0
    new-instance v3, Lorg/apache/http/client/methods/HttpPost;

    invoke-direct {v3, p1}, Lorg/apache/http/client/methods/HttpPost;-><init>(Ljava/lang/String;)V

    .line 123
    .local v3, "post":Lorg/apache/http/client/methods/HttpPost;
    invoke-virtual {v3}, Lorg/apache/http/client/methods/HttpPost;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v6

    const-string v7, "http.socket.timeout"

    new-instance v8, Ljava/lang/Integer;

    const/16 v9, 0x4e20

    invoke-direct {v8, v9}, Ljava/lang/Integer;-><init>(I)V

    invoke-interface {v6, v7, v8}, Lorg/apache/http/params/HttpParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/http/params/HttpParams;

    .line 124
    invoke-virtual {v3, v2}, Lorg/apache/http/client/methods/HttpPost;->setEntity(Lorg/apache/http/HttpEntity;)V

    .line 125
    new-instance v1, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v1}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>()V

    .line 126
    .local v1, "httpClient":Lorg/apache/http/impl/client/DefaultHttpClient;
    invoke-virtual {v1, v3}, Lorg/apache/http/impl/client/DefaultHttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v4

    .line 127
    .local v4, "response":Lorg/apache/http/HttpResponse;
    invoke-interface {v4}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v6

    invoke-static {v6}, Lorg/apache/http/util/EntityUtils;->toString(Lorg/apache/http/HttpEntity;)Ljava/lang/String;

    move-result-object v5

    .line 128
    .local v5, "result":Ljava/lang/String;
    invoke-interface {v4}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;

    move-result-object v6

    invoke-interface {v6}, Lorg/apache/http/StatusLine;->getStatusCode()I

    move-result v6

    const/16 v7, 0xc8

    if-ne v6, v7, :cond_2

    move-object v6, v5

    .line 129
    goto :goto_0

    .line 131
    :cond_2
    iget-object v6, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lrexsee/open/RexseeTencentWeibo;->getInterfaceName()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, ".post"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "["

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "]"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v7, v8}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 132
    const-string v6, ""

    goto/16 :goto_0

    .line 134
    .end local v1    # "httpClient":Lorg/apache/http/impl/client/DefaultHttpClient;
    .end local v3    # "post":Lorg/apache/http/client/methods/HttpPost;
    .end local v4    # "response":Lorg/apache/http/HttpResponse;
    .end local v5    # "result":Ljava/lang/String;
    :catch_0
    move-exception v6

    move-object v0, v6

    .line 135
    .local v0, "e":Ljava/lang/Exception;
    iget-object v6, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lrexsee/open/RexseeTencentWeibo;->getInterfaceName()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, ".post"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    new-instance v8, Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v9

    invoke-static {v9}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "["

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "]"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v7, v8}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 136
    const-string v6, ""

    goto/16 :goto_0
.end method

.method static synthetic access$0(Lrexsee/open/RexseeTencentWeibo;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 63
    iget-object v0, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method

.method public static getPopMenuItem(Lrexsee/core/browser/Browser;)Lrexsee/core/menu/PopMenuItem;
    .locals 5
    .param p0, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 89
    invoke-virtual {p0}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v1

    const-string v2, "TencentWeiboEnabled"

    const/4 v3, 0x1

    invoke-static {v1, v2, v3}, Lrexsee/core/application/Resource;->isEnabled(Landroid/content/Context;Ljava/lang/String;Z)Z

    move-result v1

    if-nez v1, :cond_0

    const/4 v1, 0x0

    .line 102
    :goto_0
    return-object v1

    .line 91
    :cond_0
    new-instance v0, Lrexsee/core/menu/PopMenuItem;

    invoke-virtual {p0}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v1

    const-string v2, "\u817e\u8baf\u5fae\u535a"

    new-instance v3, Lrexsee/open/RexseeTencentWeibo$1;

    invoke-direct {v3, p0}, Lrexsee/open/RexseeTencentWeibo$1;-><init>(Lrexsee/core/browser/Browser;)V

    .line 101
    const-string v4, "label:\u817e\u8baf\u5fae\u535a;"

    .line 91
    invoke-direct {v0, v1, v2, v3, v4}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .local v0, "item":Lrexsee/core/menu/PopMenuItem;
    move-object v1, v0

    .line 102
    goto :goto_0
.end method


# virtual methods
.method public add(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .param p1, "message"    # Ljava/lang/String;
    .param p2, "ip"    # Ljava/lang/String;
    .param p3, "longitude"    # Ljava/lang/String;
    .param p4, "latitude"    # Ljava/lang/String;

    .prologue
    .line 277
    if-eqz p2, :cond_0

    invoke-virtual {p2}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v1

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    :cond_0
    const-string p2, "112.90.140.155"

    .line 278
    :cond_1
    if-nez p3, :cond_2

    const-string p3, ""

    .line 279
    :cond_2
    if-nez p4, :cond_3

    const-string p4, ""

    .line 280
    :cond_3
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "url:http://open.t.qq.com/api/t/add;method:post;clientip:"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";content:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";jing:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";wei:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 281
    .local v0, "argu":Ljava/lang/String;
    const-string v1, "\u6b63\u5728\u53d1\u9001\u5fae\u535a......"

    invoke-virtual {p0, v0, v1}, Lrexsee/open/RexseeTencentWeibo;->request(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public addPic(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 25
    .param p1, "message"    # Ljava/lang/String;
    .param p2, "file"    # Ljava/lang/String;
    .param p3, "ip"    # Ljava/lang/String;
    .param p4, "longitude"    # Ljava/lang/String;
    .param p5, "latitude"    # Ljava/lang/String;

    .prologue
    .line 284
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    iget-object v0, v0, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    move-object/from16 v21, v0

    const-string v22, "\u6b63\u5728\u53d1\u9001\u5fae\u535a......"

    invoke-virtual/range {v21 .. v22}, Lrexsee/core/progress/RexseeProgressDialog;->show(Ljava/lang/String;)V

    .line 286
    const-string v4, "http://open.t.qq.com/api/t/add_pic"

    .line 288
    .local v4, "URL_ADDPIC":Ljava/lang/String;
    if-eqz p3, :cond_0

    invoke-virtual/range {p3 .. p3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v21

    const-string v22, ""

    invoke-virtual/range {v21 .. v22}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v21

    if-eqz v21, :cond_1

    :cond_0
    const-string p3, "112.90.140.155"

    .line 289
    :cond_1
    if-nez p4, :cond_2

    const-string p4, ""

    .line 290
    :cond_2
    if-nez p5, :cond_3

    const-string p5, ""

    .line 292
    :cond_3
    invoke-virtual/range {p2 .. p2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v21

    const-string v22, "file://"

    invoke-virtual/range {v21 .. v22}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v21

    if-nez v21, :cond_4

    .line 293
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    move-object/from16 v21, v0

    const-string v22, "API.addPic"

    new-instance v23, Ljava/lang/StringBuilder;

    const-string v24, "Invalid file name.["

    invoke-direct/range {v23 .. v24}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v23

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    const-string v24, "]"

    invoke-virtual/range {v23 .. v24}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    invoke-virtual/range {v23 .. v23}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v23

    invoke-virtual/range {v21 .. v23}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 294
    const-string v21, ""

    .line 367
    :goto_0
    return-object v21

    .line 297
    :cond_4
    const/16 v21, 0x7

    move-object/from16 v0, p2

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object p2

    .line 298
    invoke-static/range {p2 .. p2}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v5

    .line 299
    .local v5, "bitmap":Landroid/graphics/Bitmap;
    if-nez v5, :cond_5

    .line 300
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    move-object/from16 v21, v0

    const-string v22, "API.addPic"

    new-instance v23, Ljava/lang/StringBuilder;

    const-string v24, "Picture not found.["

    invoke-direct/range {v23 .. v24}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v23

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    const-string v24, "]"

    invoke-virtual/range {v23 .. v24}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    invoke-virtual/range {v23 .. v23}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v23

    invoke-virtual/range {v21 .. v23}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 301
    const-string v21, ""

    goto :goto_0

    .line 303
    :cond_5
    const-string v21, "/"

    move-object/from16 v0, p2

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v21

    add-int/lit8 v21, v21, 0x1

    move-object/from16 v0, p2

    move/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v12

    .line 305
    .local v12, "filename":Ljava/lang/String;
    new-instance v14, Ljava/util/HashMap;

    invoke-direct {v14}, Ljava/util/HashMap;-><init>()V

    .line 306
    .local v14, "map":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v21, "content"

    invoke-static/range {p1 .. p1}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    move-object v0, v14

    move-object/from16 v1, v21

    move-object/from16 v2, v22

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 307
    const-string v21, "clientip"

    move-object v0, v14

    move-object/from16 v1, v21

    move-object/from16 v2, p3

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 308
    const-string v21, "jing"

    move-object v0, v14

    move-object/from16 v1, v21

    move-object/from16 v2, p4

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 309
    const-string v21, "wei"

    move-object v0, v14

    move-object/from16 v1, v21

    move-object/from16 v2, p5

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 310
    const-string v21, "pic"

    const-string v22, "pic"

    move-object v0, v14

    move-object/from16 v1, v21

    move-object/from16 v2, v22

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 311
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    move-object/from16 v21, v0

    const-string v22, "POST"

    move-object/from16 v0, v21

    move-object v1, v4

    move-object/from16 v2, v22

    move-object v3, v14

    invoke-virtual {v0, v1, v2, v3}, Lrexsee/open/TencentOauth;->sign(Ljava/lang/String;Ljava/lang/String;Ljava/util/HashMap;)Z

    move-result v21

    if-nez v21, :cond_6

    .line 312
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    move-object/from16 v21, v0

    const-string v22, "API.addPic"

    new-instance v23, Ljava/lang/StringBuilder;

    const-string v24, "Sinature error!["

    invoke-direct/range {v23 .. v24}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v23

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    const-string v24, "]"

    invoke-virtual/range {v23 .. v24}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    invoke-virtual/range {v23 .. v23}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v23

    invoke-virtual/range {v21 .. v23}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 313
    const-string v21, ""

    goto/16 :goto_0

    .line 318
    :cond_6
    :try_start_0
    new-instance v19, Ljava/net/URL;

    move-object/from16 v0, v19

    move-object v1, v4

    invoke-direct {v0, v1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    .line 319
    .local v19, "url":Ljava/net/URL;
    invoke-virtual/range {v19 .. v19}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;

    move-result-object v20

    check-cast v20, Ljava/net/HttpURLConnection;

    .line 320
    .local v20, "urlConnection":Ljava/net/HttpURLConnection;
    const-string v21, "POST"

    invoke-virtual/range {v20 .. v21}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V

    .line 321
    const/16 v21, 0x1

    invoke-virtual/range {v20 .. v21}, Ljava/net/HttpURLConnection;->setDoInput(Z)V

    .line 322
    const/16 v21, 0x1

    invoke-virtual/range {v20 .. v21}, Ljava/net/HttpURLConnection;->setDoOutput(Z)V

    .line 323
    const/16 v21, 0x4e20

    invoke-virtual/range {v20 .. v21}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V

    .line 324
    const/16 v21, 0x4e20

    invoke-virtual/range {v20 .. v21}, Ljava/net/HttpURLConnection;->setReadTimeout(I)V

    .line 325
    const/16 v21, 0x0

    invoke-virtual/range {v20 .. v21}, Ljava/net/HttpURLConnection;->setUseCaches(Z)V

    .line 327
    const-string v21, "Connection"

    const-string v22, "Keep-Alive"

    invoke-virtual/range {v20 .. v22}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    .line 328
    const-string v21, "Content-Type"

    const-string v22, "multipart/form-data;boundary=*****"

    invoke-virtual/range {v20 .. v22}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    .line 329
    invoke-virtual/range {v20 .. v20}, Ljava/net/HttpURLConnection;->connect()V

    .line 331
    new-instance v9, Ljava/io/DataOutputStream;

    invoke-virtual/range {v20 .. v20}, Ljava/net/HttpURLConnection;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v21

    move-object v0, v9

    move-object/from16 v1, v21

    invoke-direct {v0, v1}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V

    .line 332
    .local v9, "dos":Ljava/io/DataOutputStream;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    move-object v1, v9

    move-object v2, v14

    invoke-virtual {v0, v1, v2}, Lrexsee/open/TencentOauth;->writeToOutput(Ljava/io/OutputStream;Ljava/util/HashMap;)V

    .line 334
    const-string v21, "--*****\r\n"

    move-object v0, v9

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 335
    new-instance v21, Ljava/lang/StringBuilder;

    const-string v22, "Content-Disposition: form-data; name=\"pic\"; filename=\""

    invoke-direct/range {v21 .. v22}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v21

    move-object v1, v12

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    const-string v22, "\"; "

    invoke-virtual/range {v21 .. v22}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    const-string v22, "\r\n"

    invoke-virtual/range {v21 .. v22}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v21

    move-object v0, v9

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 336
    const-string v21, "\r\n"

    move-object v0, v9

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 337
    new-instance v11, Ljava/io/FileInputStream;

    move-object v0, v11

    move-object/from16 v1, p2

    invoke-direct {v0, v1}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V

    .line 338
    .local v11, "fileInputStream":Ljava/io/FileInputStream;
    const/16 v18, 0x0

    .line 339
    .local v18, "uploadedSize":I
    const/16 v21, 0x400

    move/from16 v0, v21

    new-array v0, v0, [B

    move-object v7, v0

    .line 340
    .local v7, "buffer":[B
    const/4 v8, 0x0

    .line 341
    .local v8, "bufferLength":I
    :goto_1
    invoke-virtual {v11, v7}, Ljava/io/FileInputStream;->read([B)I

    move-result v8

    if-gtz v8, :cond_7

    .line 345
    const-string v21, "\r\n"

    move-object v0, v9

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 346
    const-string v21, "--*****--\r\n"

    move-object v0, v9

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 347
    invoke-virtual {v11}, Ljava/io/FileInputStream;->close()V

    .line 348
    invoke-virtual {v9}, Ljava/io/DataOutputStream;->flush()V

    .line 349
    invoke-virtual {v9}, Ljava/io/DataOutputStream;->close()V

    .line 351
    invoke-virtual/range {v20 .. v20}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;

    move-result-object v16

    .line 352
    .local v16, "responseStream":Ljava/io/InputStream;
    new-instance v17, Ljava/io/InputStreamReader;

    move-object/from16 v0, v17

    move-object/from16 v1, v16

    invoke-direct {v0, v1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    .line 353
    .local v17, "responseStreamReader":Ljava/io/InputStreamReader;
    new-instance v6, Ljava/io/BufferedReader;

    move-object v0, v6

    move-object/from16 v1, v17

    invoke-direct {v0, v1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    .line 354
    .local v6, "bufReader":Ljava/io/BufferedReader;
    const/4 v13, 0x0

    .line 355
    .local v13, "line":Ljava/lang/String;
    const-string v15, ""

    .line 356
    .local v15, "response":Ljava/lang/String;
    :goto_2
    invoke-virtual {v6}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v13

    if-nez v13, :cond_8

    .line 359
    invoke-virtual/range {v16 .. v16}, Ljava/io/InputStream;->close()V

    .line 360
    invoke-virtual/range {v20 .. v20}, Ljava/net/HttpURLConnection;->disconnect()V

    .line 361
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    iget-object v0, v0, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    move-object/from16 v21, v0

    invoke-virtual/range {v21 .. v21}, Lrexsee/core/progress/RexseeProgressDialog;->hide()V

    move-object/from16 v21, v15

    .line 362
    goto/16 :goto_0

    .line 342
    .end local v6    # "bufReader":Ljava/io/BufferedReader;
    .end local v13    # "line":Ljava/lang/String;
    .end local v15    # "response":Ljava/lang/String;
    .end local v16    # "responseStream":Ljava/io/InputStream;
    .end local v17    # "responseStreamReader":Ljava/io/InputStreamReader;
    :cond_7
    const/16 v21, 0x0

    move-object v0, v9

    move-object v1, v7

    move/from16 v2, v21

    move v3, v8

    invoke-virtual {v0, v1, v2, v3}, Ljava/io/DataOutputStream;->write([BII)V

    .line 343
    add-int v18, v18, v8

    goto :goto_1

    .line 357
    .restart local v6    # "bufReader":Ljava/io/BufferedReader;
    .restart local v13    # "line":Ljava/lang/String;
    .restart local v15    # "response":Ljava/lang/String;
    .restart local v16    # "responseStream":Ljava/io/InputStream;
    .restart local v17    # "responseStreamReader":Ljava/io/InputStreamReader;
    :cond_8
    new-instance v21, Ljava/lang/StringBuilder;

    invoke-static {v15}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v22

    invoke-direct/range {v21 .. v22}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v21

    move-object v1, v13

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v15

    goto :goto_2

    .line 364
    .end local v6    # "bufReader":Ljava/io/BufferedReader;
    .end local v7    # "buffer":[B
    .end local v8    # "bufferLength":I
    .end local v9    # "dos":Ljava/io/DataOutputStream;
    .end local v11    # "fileInputStream":Ljava/io/FileInputStream;
    .end local v13    # "line":Ljava/lang/String;
    .end local v15    # "response":Ljava/lang/String;
    .end local v16    # "responseStream":Ljava/io/InputStream;
    .end local v17    # "responseStreamReader":Ljava/io/InputStreamReader;
    .end local v18    # "uploadedSize":I
    .end local v19    # "url":Ljava/net/URL;
    .end local v20    # "urlConnection":Ljava/net/HttpURLConnection;
    :catch_0
    move-exception v21

    move-object/from16 v10, v21

    .line 365
    .local v10, "e":Ljava/lang/Exception;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    iget-object v0, v0, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    move-object/from16 v21, v0

    invoke-virtual/range {v21 .. v21}, Lrexsee/core/progress/RexseeProgressDialog;->hide()V

    .line 366
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    move-object/from16 v21, v0

    const-string v22, "API.addPic"

    new-instance v23, Ljava/lang/StringBuilder;

    invoke-virtual {v10}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v24

    invoke-static/range {v24 .. v24}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v24

    invoke-direct/range {v23 .. v24}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v24, "["

    invoke-virtual/range {v23 .. v24}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    move-object/from16 v0, v23

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    const-string v24, "]"

    invoke-virtual/range {v23 .. v24}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    invoke-virtual/range {v23 .. v23}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v23

    invoke-virtual/range {v21 .. v23}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 367
    const-string v21, ""

    goto/16 :goto_0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 49
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 45
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "TencentWeibo"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getKeyAndSecret()Ljava/lang/String;
    .locals 2

    .prologue
    .line 150
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "{\"key\":\""

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lrexsee/open/RexseeTencentWeibo;->mKey:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\",\"secret\":\""

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lrexsee/open/RexseeTencentWeibo;->mSecret:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\",\"Oauth\":"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    invoke-virtual {v1}, Lrexsee/open/TencentOauth;->getJson()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "}"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 53
    new-instance v0, Lrexsee/open/RexseeTencentWeibo;

    invoke-direct {v0, p1}, Lrexsee/open/RexseeTencentWeibo;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public isReady()Z
    .locals 1

    .prologue
    .line 162
    iget-object v0, p0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    iget-boolean v0, v0, Lrexsee/open/TencentOauth;->status_access_token:Z

    return v0
.end method

.method public login()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 154
    invoke-virtual {p0, v0, v0, v0}, Lrexsee/open/RexseeTencentWeibo;->loginAndRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 155
    return-void
.end method

.method public loginAndRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 4
    .param p1, "arguments"    # Ljava/lang/String;
    .param p2, "progressTitle"    # Ljava/lang/String;
    .param p3, "successMessage"    # Ljava/lang/String;

    .prologue
    .line 166
    iget-object v0, p0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    iget-object v1, p0, Lrexsee/open/RexseeTencentWeibo;->mKey:Ljava/lang/String;

    iget-object v2, p0, Lrexsee/open/RexseeTencentWeibo;->mSecret:Ljava/lang/String;

    new-instance v3, Lrexsee/open/RexseeTencentWeibo$2;

    invoke-direct {v3, p0, p1, p2, p3}, Lrexsee/open/RexseeTencentWeibo$2;-><init>(Lrexsee/open/RexseeTencentWeibo;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2, v3}, Lrexsee/open/TencentOauth;->login(Ljava/lang/String;Ljava/lang/String;Lrexsee/open/TencentOauth$OauthRunnable;)V

    .line 189
    return-void
.end method

.method public logout()V
    .locals 3

    .prologue
    .line 158
    iget-object v0, p0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    iget-object v1, p0, Lrexsee/open/RexseeTencentWeibo;->mOauth:Lrexsee/open/TencentOauth;

    const/4 v2, 0x0

    iput-boolean v2, v1, Lrexsee/open/TencentOauth;->status_request_token:Z

    iput-boolean v2, v0, Lrexsee/open/TencentOauth;->status_access_token:Z

    .line 159
    return-void
.end method

.method public promptAndAdd()V
    .locals 5

    .prologue
    const-string v4, ""

    .line 217
    const-string v1, "\u563f\u563f\uff0c\u6211\u6b63\u5728\u6d4f\u89c8\u7528@rexsee_china\uff08http://www.rexsee.com\uff09\u521b\u5efa\u7684Android\u5e94\u7528{appName}\u3002"

    const-string v2, "{appName}"

    iget-object v3, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v3, v3, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v3}, Lrexsee/core/application/RexseeApplication;->getLabel()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    .line 218
    .local v0, "defaultMessage":Ljava/lang/String;
    const-string v1, "112.90.140.155"

    const-string v2, ""

    const-string v2, ""

    invoke-virtual {p0, v0, v1, v4, v4}, Lrexsee/open/RexseeTencentWeibo;->promptAndAdd(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 219
    return-void
.end method

.method public promptAndAdd(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 9
    .param p1, "defaultMessage"    # Ljava/lang/String;
    .param p2, "ip"    # Ljava/lang/String;
    .param p3, "longitude"    # Ljava/lang/String;
    .param p4, "latitude"    # Ljava/lang/String;

    .prologue
    const/4 v5, 0x0

    const/4 v8, -0x1

    const/16 v4, 0xf

    .line 221
    new-instance v1, Landroid/app/AlertDialog$Builder;

    iget-object v3, p0, Lrexsee/open/RexseeTencentWeibo;->mContext:Landroid/content/Context;

    invoke-direct {v1, v3}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v6

    .line 222
    .local v6, "dialog":Landroid/app/AlertDialog;
    iget-object v1, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->icon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v6, v1}, Landroid/app/AlertDialog;->setIcon(Landroid/graphics/drawable/Drawable;)V

    .line 223
    const-string v1, "\u817e\u8baf\u5fae\u535a"

    invoke-virtual {v6, v1}, Landroid/app/AlertDialog;->setTitle(Ljava/lang/CharSequence;)V

    .line 224
    invoke-virtual {v6, v5}, Landroid/app/AlertDialog;->setCancelable(Z)V

    .line 225
    new-instance v1, Lrexsee/open/RexseeTencentWeibo$3;

    invoke-direct {v1, p0}, Lrexsee/open/RexseeTencentWeibo$3;-><init>(Lrexsee/open/RexseeTencentWeibo;)V

    invoke-virtual {v6, v1}, Landroid/app/AlertDialog;->setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)V

    .line 232
    new-instance v7, Landroid/widget/LinearLayout;

    iget-object v1, p0, Lrexsee/open/RexseeTencentWeibo;->mContext:Landroid/content/Context;

    invoke-direct {v7, v1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 233
    .local v7, "layout":Landroid/widget/LinearLayout;
    const/4 v1, 0x1

    invoke-virtual {v7, v1}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 234
    invoke-virtual {v7, v4, v4, v4, v4}, Landroid/widget/LinearLayout;->setPadding(IIII)V

    .line 235
    new-instance v2, Landroid/widget/EditText;

    iget-object v1, p0, Lrexsee/open/RexseeTencentWeibo;->mContext:Landroid/content/Context;

    invoke-direct {v2, v1}, Landroid/widget/EditText;-><init>(Landroid/content/Context;)V

    .line 236
    .local v2, "editBox":Landroid/widget/EditText;
    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    const/16 v3, 0xc8

    invoke-direct {v1, v8, v3}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v7, v2, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 237
    const/16 v1, 0x33

    invoke-virtual {v2, v1}, Landroid/widget/EditText;->setGravity(I)V

    .line 238
    invoke-virtual {v2, v5}, Landroid/widget/EditText;->setSingleLine(Z)V

    .line 239
    invoke-virtual {v2, p1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 240
    invoke-virtual {v2}, Landroid/widget/EditText;->requestFocus()Z

    .line 241
    invoke-virtual {v6, v7}, Landroid/app/AlertDialog;->setView(Landroid/view/View;)V

    .line 242
    new-instance v0, Lrexsee/open/RexseeTencentWeibo$4;

    move-object v1, p0

    move-object v3, p2

    move-object v4, p3

    move-object v5, p4

    invoke-direct/range {v0 .. v5}, Lrexsee/open/RexseeTencentWeibo$4;-><init>(Lrexsee/open/RexseeTencentWeibo;Landroid/widget/EditText;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 271
    .local v0, "listener":Landroid/content/DialogInterface$OnClickListener;
    sget-object v1, Lrexsee/core/lang/RexseeLanguage;->ACTION_SHARE:Ljava/lang/String;

    invoke-virtual {v6, v8, v1, v0}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 272
    const/4 v1, -0x2

    iget-object v3, p0, Lrexsee/open/RexseeTencentWeibo;->mContext:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const/high16 v4, 0x1040000

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v6, v1, v3, v0}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 273
    invoke-virtual {v6}, Landroid/app/AlertDialog;->show()V

    .line 275
    return-void
.end method

.method public request(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 10
    .param p1, "arguments"    # Ljava/lang/String;
    .param p2, "progressTitle"    # Ljava/lang/String;

    .prologue
    const-string v9, "method"

    const-string v8, "url"

    .line 192
    iget-object v7, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v7, v7, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    invoke-virtual {v7, p2}, Lrexsee/core/progress/RexseeProgressDialog;->show(Ljava/lang/String;)V

    .line 193
    invoke-static {p1}, Lrexsee/core/utilities/Utilities;->string2map(Ljava/lang/String;)Ljava/util/HashMap;

    move-result-object v3

    .line 194
    .local v3, "paramMap":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v7, "url"

    invoke-virtual {v3, v8}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_0

    .line 195
    iget-object v7, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    new-instance v8, Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lrexsee/open/RexseeTencentWeibo;->getInterfaceName()Ljava/lang/String;

    move-result-object v9

    invoke-static {v9}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, ".request"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    const-string v9, "The argument url should not be null."

    invoke-virtual {v7, v8, v9}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 196
    const-string v7, ""

    .line 212
    :goto_0
    return-object v7

    .line 198
    :cond_0
    const-string v7, "url"

    invoke-virtual {v3, v8}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/lang/String;

    .line 199
    .local v6, "url":Ljava/lang/String;
    const-string v7, "url"

    invoke-virtual {v3, v8}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 200
    const-string v8, "get"

    const-string v7, "method"

    invoke-virtual {v3, v9}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/lang/String;

    invoke-virtual {v8, v7}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v7

    if-eqz v7, :cond_1

    const/4 v7, 0x0

    move v4, v7

    .line 201
    .local v4, "post":Z
    :goto_1
    const-string v7, "method"

    invoke-virtual {v3, v9}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 202
    const-string v7, "format"

    invoke-virtual {v3, v7}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 204
    new-instance v2, Ljava/util/HashMap;

    invoke-direct {v2}, Ljava/util/HashMap;-><init>()V

    .line 205
    .local v2, "map":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    invoke-virtual {v3}, Ljava/util/HashMap;->keySet()Ljava/util/Set;

    move-result-object v7

    invoke-interface {v7}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .line 206
    .local v0, "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/lang/String;>;"
    :goto_2
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-nez v7, :cond_2

    .line 210
    if-eqz v4, :cond_3

    invoke-direct {p0, v6, v2}, Lrexsee/open/RexseeTencentWeibo;->_post(Ljava/lang/String;Ljava/util/HashMap;)Ljava/lang/String;

    move-result-object v7

    move-object v5, v7

    .line 211
    .local v5, "rtn":Ljava/lang/String;
    :goto_3
    iget-object v7, p0, Lrexsee/open/RexseeTencentWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v7, v7, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    invoke-virtual {v7}, Lrexsee/core/progress/RexseeProgressDialog;->hide()V

    move-object v7, v5

    .line 212
    goto :goto_0

    .line 200
    .end local v0    # "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/lang/String;>;"
    .end local v2    # "map":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    .end local v4    # "post":Z
    .end local v5    # "rtn":Ljava/lang/String;
    :cond_1
    const/4 v7, 0x1

    move v4, v7

    goto :goto_1

    .line 207
    .restart local v0    # "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/lang/String;>;"
    .restart local v2    # "map":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    .restart local v4    # "post":Z
    :cond_2
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 208
    .local v1, "key":Ljava/lang/String;
    invoke-virtual {v3, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/lang/String;

    invoke-static {v7}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v2, v1, v7}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_2

    .line 210
    .end local v1    # "key":Ljava/lang/String;
    :cond_3
    invoke-direct {p0, v6, v2}, Lrexsee/open/RexseeTencentWeibo;->_get(Ljava/lang/String;Ljava/util/HashMap;)Ljava/lang/String;

    move-result-object v7

    move-object v5, v7

    goto :goto_3
.end method

.method public setKeyAndSecret(Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .param p1, "key"    # Ljava/lang/String;
    .param p2, "secret"    # Ljava/lang/String;

    .prologue
    .line 145
    iput-object p1, p0, Lrexsee/open/RexseeTencentWeibo;->mKey:Ljava/lang/String;

    .line 146
    iput-object p2, p0, Lrexsee/open/RexseeTencentWeibo;->mSecret:Ljava/lang/String;

    .line 147
    return-void
.end method
